Fix DeployAppCommand to work right with source-directory parameter#18
Fix DeployAppCommand to work right with source-directory parameter#18ido-ran wants to merge 1 commit intoappharbor:masterfrom
Conversation
The Tar library use Environment.CurrentDirectory as reference path so it is needed to change it when using specified source-directory. When specifying source-directory parameter validate the directory really exists.
|
Ido, thanks for this contribution. Just need to make sure I understand the actual issue - why is it necessary to change the current environment's directory while packing the files? I just tried it and the generated tarball seems just fine without changing the current directory. I take it that you've encountered an issue that prompted this change? |
|
Yes, I encounter an issue when the source directory is a relative path. The specific scenario I have is that MSBuild create the site binary files inside the project directory\obj\package so when I pass this relative path the resulting zipped file preserve this relative path and when extracting it to AppHarbor the site does not work because if that. Please try to deploy using source directory that is relative to see the problem. |
|
Oh alright - how about detecting if the path is relative when the parameter is specified, and then prepend the relative path with the current directory path if it is? That way we can avoid changing the environment altogether |
|
I'll give it a try, I see how this is better implementation. |
The Tar library use Environment.CurrentDirectory as reference path so it is needed to change it when using specified source-directory.
When specifying source-directory parameter validate the directory really exists.